package 设计模式.r_状态模式;

import cn.hutool.core.thread.ThreadUtil;
import cn.hutool.log.StaticLog;

/**
 * @author caihe
 * @date 2023/3/22 14:48
 */
public class Elevator {
    
    private ElevatorState state;
    private int floor;

    public Elevator() {
        state = new OpenElevator();
        floor = 1;
    }
    
    public void open() {
        state.open(this);
    }

    public void close() {
        state.close(this);
    }

    public void move() {
        state.move(this);
    }
    
    

    public int getFloor() {
        return floor;
    }

    public void setFloor(int floor) {
        this.floor = floor;
    }

    public ElevatorState getState() {
        return state;
    }

    public void setState(ElevatorState state) {
        this.state = state;
    }
}
